<div class="links view">
	<h2><?php  echo __('Link');?></h2>
	<div class="clear"></div>
	<div class="actions selected">
		<?php $project_id = $this->Form->value('Project.project_id'); if(!empty($project_id)) echo $this->Html->link(__('Cancel'), array('controller'=>'projects','action' => 'view',$project_id));?>
		<?php echo $this->Html->link(__('Edit Link'), array('action' => 'edit', $link['Link']['id'],'p'=>$project_id)); ?>
		<?php echo $this->Form->postLink(__('Delete Link'), array('action' => 'delete', $link['Link']['id'],'p'=>$project_id), null, __('Are you sure you want to delete # %s?', $link['Link']['id'])); ?>
	</div>
	<div class="clear"></div>
	
	<dl>
		<dt><?php echo __('Id'); ?></dt>
		<dd>
			<?php echo h($link['Link']['id']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Back Links'); ?></dt>
		<dd>
			<?php echo h($link['Link']['back_links']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Target Links'); ?></dt>
		<dd>
			<?php echo h($link['Link']['target_links']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Created'); ?></dt>
		<dd>
			<?php echo h($link['Link']['created']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Modified'); ?></dt>
		<dd>
			<?php echo h($link['Link']['modified']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Display Time'); ?></dt>
		<dd>
			<?php echo h($link['Link']['display_time']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Anchor Text'); ?></dt>
		<dd>
			<?php echo h($link['Link']['anchor_text']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Contact Name'); ?></dt>
		<dd>
			<?php echo h($link['Link']['contact_name']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Contact Email'); ?></dt>
		<dd>
			<?php echo h($link['Link']['contact_email']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Price Montchly'); ?></dt>
		<dd>
			<?php echo h($link['Link']['price_montchly']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Price Yearly'); ?></dt>
		<dd>
			<?php echo h($link['Link']['price_yearly']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Status'); ?></dt>
		<dd>
			<?php echo h($link['Link']['status']); ?>
			&nbsp;
		</dd>
	</dl>


	<div class="related">
		<h3><?php echo __('Related Domains');?></h3>
		<?php if (!empty($link['Domain'])):?>
		<table cellpadding = "0" cellspacing = "0">
		<tr>
			<th><?php echo __('Id'); ?></th>
			<th><?php echo __('Server Id'); ?></th>
			<th><?php echo __('Serversip Id'); ?></th>
			<th><?php echo __('Name'); ?></th>
			<th><?php echo __('Descriptions'); ?></th>
			<th><?php echo __('Keywords'); ?></th>
			<th><?php echo __('Added'); ?></th>
			<th><?php echo __('Modified'); ?></th>
			<th class="actions"><?php echo __('Actions');?></th>
		</tr>
		<?php
			$i = 0;
			foreach ($link['Domain'] as $domain): ?>
			<tr>
				<td><?php echo $domain['id'];?></td>
				<td><?php echo $domain['server_id'];?></td>
				<td><?php echo $domain['serversip_id'];?></td>
				<td><?php echo $domain['name'];?></td>
				<td><?php echo $domain['descriptions'];?></td>
				<td><?php echo $domain['keywords'];?></td>
				<td><?php echo $domain['added'];?></td>
				<td><?php echo $domain['modified'];?></td>
				<td class="actions">
					<?php echo $this->Html->link(__('View'), array('controller' => 'domains', 'action' => 'view', $domain['id'])); ?>
					<?php echo $this->Html->link(__('Edit'), array('controller' => 'domains', 'action' => 'edit', $domain['id'])); ?>
					<?php echo $this->Form->postLink(__('Delete'), array('controller' => 'domains', 'action' => 'delete', $domain['id']), null, __('Are you sure you want to delete # %s?', $domain['id'])); ?>
				</td>
			</tr>
		<?php endforeach; ?>
		</table>
	<?php endif; ?>
	
		<div class="actions">
			<ul>
				<li><?php echo $this->Html->link(__('New Domain'), array('controller' => 'domains', 'action' => 'add'));?> </li>
			</ul>
		</div>
	</div>
	<div class="related">
		<h3><?php echo __('Related Projects');?></h3>
		<?php if (!empty($link['Project'])):?>
		<table cellpadding = "0" cellspacing = "0">
		<tr>
			<th><?php echo __('Id'); ?></th>
			<th><?php echo __('Name'); ?></th>
			<th><?php echo __('Descriptions'); ?></th>
			<th><?php echo __('Added'); ?></th>
			<th><?php echo __('Modified'); ?></th>
			<th><?php echo __('Domain'); ?></th>
			<th><?php echo __('Pagerank'); ?></th>
			<th><?php echo __('Backlinks'); ?></th>
			<th class="actions"><?php echo __('Actions');?></th>
		</tr>
		<?php
			$i = 0;
			foreach ($link['Project'] as $project): ?>
			<tr>
				<td><?php echo $project['id'];?></td>
				<td><?php echo $project['name'];?></td>
				<td><?php echo $project['descriptions'];?></td>
				<td><?php echo $project['added'];?></td>
				<td><?php echo $project['modified'];?></td>
				<td><?php echo $project['domain'];?></td>
				<td><?php echo $project['pagerank'];?></td>
				<td><?php echo $project['backlinks'];?></td>
				<td class="actions">
					<?php echo $this->Html->link(__('View'), array('controller' => 'projects', 'action' => 'view', $project['id'])); ?>
					<?php echo $this->Html->link(__('Edit'), array('controller' => 'projects', 'action' => 'edit', $project['id'])); ?>
					<?php echo $this->Form->postLink(__('Delete'), array('controller' => 'projects', 'action' => 'delete', $project['id']), null, __('Are you sure you want to delete # %s?', $project['id'])); ?>
				</td>
			</tr>
		<?php endforeach; ?>
		</table>
	<?php endif; ?>
	
		<div class="actions">
			<ul>
				<li><?php echo $this->Html->link(__('New Project'), array('controller' => 'projects', 'action' => 'add'));?> </li>
			</ul>
		</div>
	</div>
	
</div>

<div class="actions">	
	<?php echo $this->element('/menu/main')?>	
	<?php echo $this->element('/menu/settings')?>	
</div>